/**
 * @file GBMgr.hpp
 * @author Derek Liu (yjkhtddx@sina.com)
 * @brief 国标28181平台控制器
 * @version 0.0.1
 * @date 2020-07-16
 * 
 * @coryright Copyright Sci-Tech Laboratories (c) 2020
 * 
 */

#pragma once
#include <stdint.h> //uint16_t
#include <string>

class GBMgr
{
public:
    struct local_sip_t
    {
        uint16_t svr_port;
        std::string svr_id;
        std::string svr_ip;
        std::string svr_domain;
    };
    struct remote_sip_t : public local_sip_t
    {
        std::string passwd;
    };

public:
    GBMgr();
    ~GBMgr();

    static GBMgr *instance();

    // int Init();
    void start();
    void init();

    //     int OnRegisterSuccess(int rid);

    //     int HandleDeviceControl(manscdp_devicecontrol_subcmd_e cmd, string &devid,
    //                             manscdp_switch_status_e onoff);

    //     int HandlePTZControl(control_cmd_t &ctrlcmd, string &devid);

    //     ///< Play Download Talk Playback
    //     int HandleMediaRequest(sdp_description_t &req_sdp, const sip_event_sptr &e);

    // private:
    //     int register_online();

    //     void heartbeat_proc(void *param);

    //     int keepalive();

private:
    bool m_bRegok; //注册成功
    local_sip_t m_localsipcfg;
    remote_sip_t m_remotesipcfg;

    // CMsgSender m_msgsender;
    // Infra::CThread m_heartbeat;
};